﻿//-----------------------------------------------------------------
//
// @(#)$Id: DownLoadTime.aspx.cs,v 1.0 2013/12/13 16:59:53 lichunhua Exp $
// @(#)$Author: lichunhua  $
// @(#)$Date: 2013/12/13 16:59:53 $
// @(#)$Description:
//
//
//
//                 All Rights Reserved.
//-----------------------------------------------------------------
using System;
using System.Data;
using ebay.Dal;
using ebay.Dal.CenterDB_SystemTableAdapters;

public partial class UI_Bas_DownLoadTime : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            T_SystemParasTableAdapter sAdapter = new T_SystemParasTableAdapter();
            DataTable orignalTable = sAdapter.GetDataByType("DownLoad");
            foreach (DataRow r in orignalTable.Rows)
            {
                string key = r["ParaKey"].ToString();
                string val = r["ParaValue"].ToString();
                switch (key)
                {
                    case "ActiveListDownLoadInterVal":
                        txtActiveListingInterval.Value = val;
                        break;
                    case "ActiveListDownLoadTime":
                        txtActiveListingTime.Value = val;
                        break;
                    case "EbayFeeDownLoadInterVal":
                        txtEBayFeeInterval.Value = val;
                        break;
                    case "EbayFeeDownLoadTime":
                        txtEBayFeeTime.Value = val;
                        break;
                    case "OrderDownLoadInterVal":
                        txtEBayOrderInterval.Value = val;
                        break;
                    case "OrderDownLoadTime":
                        txtEBayOrderTime.Value = val;
                        break;
                }
            }
        }
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        SystemPara s = new SystemPara();
        bool val = s.UpdatePara(txtEBayOrderTime.Value,
            txtEBayOrderInterval.Value,
            txtEBayFeeTime.Value,
            txtEBayFeeInterval.Value,
            txtActiveListingTime.Value,
            txtActiveListingInterval.Value);
        if (val)
        {
            WebUtility.ShowMsg("操作成功", this);
        }
    }
}
